package com.main.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="AWARD")
public class Award {
	private int id;
	private String type;
	private int rank;
	private Troll troll;
	private String AwardImage;
	private String AwardName;
	private String AwardTime;
	private int Active;
	
	@Id
	@Column(name="Id")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="Type")
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	@Column(name="Rank")
	public int getRank() {
		return rank;
	}
	public void setRank(int rank) {
		this.rank = rank;
	}
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "TrollId", nullable = false)
	public Troll getTroll() {
		return troll;
	}
	public void setTroll(Troll troll) {
		this.troll = troll;
	}
	
	@Column(name="AwardImage")
	public String getAwardImage() {
		return AwardImage;
	}
	public void setAwardImage(String awardImage) {
		AwardImage = awardImage;
	}
	
	@Column(name="AwardName")
	public String getAwardName() {
		return AwardName;
	}
	public void setAwardName(String awardName) {
		AwardName = awardName;
	}
	
	@Column(name="AwardTime")
	public String getAwardTime() {
		return AwardTime;
	}
	public void setAwardTime(String awardTime) {
		AwardTime = awardTime;
	}
	
	@Column(name="Active")
	public int getActive() {
		return Active;
	}
	public void setActive(int active) {
		Active = active;
	}
}
